<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FLAC: FLAC/metadata.h: metadata level 1 interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FLAC
   &#160;<span id="projectnumber">1.3.4</span>
   </div>
   <div id="projectbrief">Free Lossless Audio Codec</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">FLAC/metadata.h: metadata level 1 interface<div class="ingroups"><a class="el" href="group__flac.html">FLAC C API</a> &raquo; <a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a> &raquo; <a class="el" href="group__flac__metadata__level0.html">FLAC/metadata.h: metadata level 0 interface</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__flac__metadata__level2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html">FLAC/metadata.h: metadata level 2 interface</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga6accccddbb867dfc2eece9ee3ffecb3a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a></td></tr>
<tr class="separator:ga6accccddbb867dfc2eece9ee3ffecb3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gac926e7d2773a05066115cac9048bbec9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gac926e7d2773a05066115cac9048bbec9">FLAC__Metadata_SimpleIteratorStatus</a> { <br />
&#160;&#160;<a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a33aadd73194c0d7e307d643237e0ddcd">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK</a> = 0
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a0a3933cb38c8957a8d5c3d1afb4766f9">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a20e835bbb74b4d039e598617f68d2af6">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a7785f77a612be8956fbe7cab73497220">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE</a>
, <br />
&#160;&#160;<a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9af055d8c0c663e72134fe2db8037b6880">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a14c897124887858109200723826f85b7">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a088df964f0852dd7e19304e920c3ee8e">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a2ad85a32e291d1e918692d68cc22fd40">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR</a>
, <br />
&#160;&#160;<a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9ac2337299c2347ca311caeaa7d71d857c">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a2e073843fa99419d76a0b210da96ceb6">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a4f855433038c576da127fc1de9d18f9b">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR</a>
, <a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9aa8386ed0a20d7e91b0022d203ec3cdec">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR</a>
, <br />
&#160;&#160;<a class="el" href="group__flac__metadata__level1.html#ggac926e7d2773a05066115cac9048bbec9a9d821ae65a1c5de619daa88c850906df">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR</a>
<br />
 }</td></tr>
<tr class="separator:gac926e7d2773a05066115cac9048bbec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga017ae86f3351888f50feb47026ed2482"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga017ae86f3351888f50feb47026ed2482">FLAC__metadata_simple_iterator_new</a> (void)</td></tr>
<tr class="separator:ga017ae86f3351888f50feb47026ed2482"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4619be06f51429fea71e5b98900cec3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga4619be06f51429fea71e5b98900cec3e">FLAC__metadata_simple_iterator_delete</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga4619be06f51429fea71e5b98900cec3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8fd236fe6049c61f7f3b4a6ecbcd240"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__flac__metadata__level1.html#gac926e7d2773a05066115cac9048bbec9">FLAC__Metadata_SimpleIteratorStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gae8fd236fe6049c61f7f3b4a6ecbcd240">FLAC__metadata_simple_iterator_status</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:gae8fd236fe6049c61f7f3b4a6ecbcd240"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba8daf276fd7da863a2522ac050125fd"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats)</td></tr>
<tr class="separator:gaba8daf276fd7da863a2522ac050125fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5150ecd8668c610f79192a2838667790"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga5150ecd8668c610f79192a2838667790">FLAC__metadata_simple_iterator_is_writable</a> (const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga5150ecd8668c610f79192a2838667790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb7de0a1067efae353e0792dc6e51905"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gabb7de0a1067efae353e0792dc6e51905">FLAC__metadata_simple_iterator_next</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:gabb7de0a1067efae353e0792dc6e51905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6db5313b31120b28e210ae721d6525a8"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga6db5313b31120b28e210ae721d6525a8">FLAC__metadata_simple_iterator_prev</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga6db5313b31120b28e210ae721d6525a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9eb215059840960de69aa84469ba954f"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga9eb215059840960de69aa84469ba954f">FLAC__metadata_simple_iterator_is_last</a> (const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga9eb215059840960de69aa84469ba954f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade0a61723420daeb4bc226713671c6f0"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gade0a61723420daeb4bc226713671c6f0">FLAC__metadata_simple_iterator_get_block_offset</a> (const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:gade0a61723420daeb4bc226713671c6f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17b61d17e83432913abf4334d6e0c073"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__flac__format.html#gac71714ba8ddbbd66d26bb78a427fac01">FLAC__MetadataType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga17b61d17e83432913abf4334d6e0c073">FLAC__metadata_simple_iterator_get_block_type</a> (const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga17b61d17e83432913abf4334d6e0c073"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf29b9a7f2e2c762756c1444e55a119fa"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gaf29b9a7f2e2c762756c1444e55a119fa">FLAC__metadata_simple_iterator_get_block_length</a> (const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:gaf29b9a7f2e2c762756c1444e55a119fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4fea2d7d98d16e75e6d8260f690a5dc"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gad4fea2d7d98d16e75e6d8260f690a5dc">FLAC__metadata_simple_iterator_get_application_id</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator, FLAC__byte *id)</td></tr>
<tr class="separator:gad4fea2d7d98d16e75e6d8260f690a5dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1b7374cafd886ceb880b050dfa1e387a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga1b7374cafd886ceb880b050dfa1e387a">FLAC__metadata_simple_iterator_get_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
<tr class="separator:ga1b7374cafd886ceb880b050dfa1e387a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1dd863561606658f88c492682de7b80"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
<tr class="separator:gae1dd863561606658f88c492682de7b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a0c00e93bb37324a20926e92e604102"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga7a0c00e93bb37324a20926e92e604102">FLAC__metadata_simple_iterator_insert_block_after</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
<tr class="separator:ga7a0c00e93bb37324a20926e92e604102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3116c8e6e7f59914ae22c0c4c6b0a23"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gac3116c8e6e7f59914ae22c0c4c6b0a23">FLAC__metadata_simple_iterator_delete_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *iterator, FLAC__bool use_padding)</td></tr>
<tr class="separator:gac3116c8e6e7f59914ae22c0c4c6b0a23"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:gaa2a8b972800c34f9f5807cadf6ecdb57"><td class="memItemLeft" align="right" valign="top">const char *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#gaa2a8b972800c34f9f5807cadf6ecdb57">FLAC__Metadata_SimpleIteratorStatusString</a> []</td></tr>
<tr class="separator:gaa2a8b972800c34f9f5807cadf6ecdb57"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The level 1 interface provides read-write access to FLAC file metadata and operates directly on the FLAC file. </p>
<p>The general usage of this interface is:</p>
<ul>
<li>Create an iterator using <a class="el" href="group__flac__metadata__level1.html#ga017ae86f3351888f50feb47026ed2482">FLAC__metadata_simple_iterator_new()</a></li>
<li>Attach it to a file using <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> and check the exit code. Call <a class="el" href="group__flac__metadata__level1.html#ga5150ecd8668c610f79192a2838667790">FLAC__metadata_simple_iterator_is_writable()</a> to see if the file is writable, or only read access is allowed.</li>
<li>Use <a class="el" href="group__flac__metadata__level1.html#gabb7de0a1067efae353e0792dc6e51905">FLAC__metadata_simple_iterator_next()</a> and <a class="el" href="group__flac__metadata__level1.html#ga6db5313b31120b28e210ae721d6525a8">FLAC__metadata_simple_iterator_prev()</a> to traverse the blocks. This is does not read the actual blocks themselves. <a class="el" href="group__flac__metadata__level1.html#gabb7de0a1067efae353e0792dc6e51905">FLAC__metadata_simple_iterator_next()</a> is relatively fast. <a class="el" href="group__flac__metadata__level1.html#ga6db5313b31120b28e210ae721d6525a8">FLAC__metadata_simple_iterator_prev()</a> is slower since it needs to search forward from the front of the file.</li>
<li>Use <a class="el" href="group__flac__metadata__level1.html#ga17b61d17e83432913abf4334d6e0c073">FLAC__metadata_simple_iterator_get_block_type()</a> or <a class="el" href="group__flac__metadata__level1.html#ga1b7374cafd886ceb880b050dfa1e387a">FLAC__metadata_simple_iterator_get_block()</a> to access the actual data at the current iterator position. The returned object is yours to modify and free.</li>
<li>Use <a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a> to write a modified block back. You must have write permission to the original file. Make sure to read the whole comment to <a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a> below.</li>
<li>Use <a class="el" href="group__flac__metadata__level1.html#ga7a0c00e93bb37324a20926e92e604102">FLAC__metadata_simple_iterator_insert_block_after()</a> to add new blocks. Use the object creation functions from <a class="el" href="group__flac__metadata__object.html">here </a> to generate new objects.</li>
<li>Use <a class="el" href="group__flac__metadata__level1.html#gac3116c8e6e7f59914ae22c0c4c6b0a23">FLAC__metadata_simple_iterator_delete_block()</a> to remove the block currently referred to by the iterator, or replace it with padding.</li>
<li>Destroy the iterator with <a class="el" href="group__flac__metadata__level1.html#ga4619be06f51429fea71e5b98900cec3e">FLAC__metadata_simple_iterator_delete()</a> when finished.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>The FLAC file remains open the whole time between <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> and <a class="el" href="group__flac__metadata__level1.html#ga4619be06f51429fea71e5b98900cec3e">FLAC__metadata_simple_iterator_delete()</a>, so make sure you are not altering the file during this time.</dd>
<dd>
Do not modify the <em>is_last</em>, <em>length</em>, or <em>type</em> fields of returned <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> objects. These are managed automatically.</dd>
<dd>
If any of the modification functions (<a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a>, <a class="el" href="group__flac__metadata__level1.html#gac3116c8e6e7f59914ae22c0c4c6b0a23">FLAC__metadata_simple_iterator_delete_block()</a>, <a class="el" href="group__flac__metadata__level1.html#ga7a0c00e93bb37324a20926e92e604102">FLAC__metadata_simple_iterator_insert_block_after()</a>, etc.) return <code>false</code>, you should delete the iterator as it may no longer be valid. </dd></dl>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga6accccddbb867dfc2eece9ee3ffecb3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6accccddbb867dfc2eece9ee3ffecb3a">&#9670;&nbsp;</a></span>FLAC__Metadata_SimpleIterator</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The opaque structure definition for the level 1 iterator type. See the <a class="el" href="group__flac__metadata__level1.html">metadata level 1 module </a> for a detailed description. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gac926e7d2773a05066115cac9048bbec9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac926e7d2773a05066115cac9048bbec9">&#9670;&nbsp;</a></span>FLAC__Metadata_SimpleIteratorStatus</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__flac__metadata__level1.html#gac926e7d2773a05066115cac9048bbec9">FLAC__Metadata_SimpleIteratorStatus</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Status type for FLAC__Metadata_SimpleIterator.</p>
<p>The iterator's current status can be obtained by calling <a class="el" href="group__flac__metadata__level1.html#gae8fd236fe6049c61f7f3b4a6ecbcd240">FLAC__metadata_simple_iterator_status()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a33aadd73194c0d7e307d643237e0ddcd"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK&#160;</td><td class="fielddoc"><p>The iterator is in the normal OK state </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a0a3933cb38c8957a8d5c3d1afb4766f9"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT&#160;</td><td class="fielddoc"><p>The data passed into a function violated the function's usage criteria </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a20e835bbb74b4d039e598617f68d2af6"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE&#160;</td><td class="fielddoc"><p>The iterator could not open the target file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a7785f77a612be8956fbe7cab73497220"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE&#160;</td><td class="fielddoc"><p>The iterator could not find the FLAC signature at the start of the file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9af055d8c0c663e72134fe2db8037b6880"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE&#160;</td><td class="fielddoc"><p>The iterator tried to write to a file that was not writable </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a14c897124887858109200723826f85b7"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA&#160;</td><td class="fielddoc"><p>The iterator encountered input that does not conform to the FLAC metadata specification </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a088df964f0852dd7e19304e920c3ee8e"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR&#160;</td><td class="fielddoc"><p>The iterator encountered an error while reading the FLAC file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a2ad85a32e291d1e918692d68cc22fd40"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR&#160;</td><td class="fielddoc"><p>The iterator encountered an error while seeking in the FLAC file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9ac2337299c2347ca311caeaa7d71d857c"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR&#160;</td><td class="fielddoc"><p>The iterator encountered an error while writing the FLAC file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a2e073843fa99419d76a0b210da96ceb6"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR&#160;</td><td class="fielddoc"><p>The iterator encountered an error renaming the FLAC file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a4f855433038c576da127fc1de9d18f9b"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR&#160;</td><td class="fielddoc"><p>The iterator encountered an error removing the temporary file </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9aa8386ed0a20d7e91b0022d203ec3cdec"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR&#160;</td><td class="fielddoc"><p>Memory allocation failed </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac926e7d2773a05066115cac9048bbec9a9d821ae65a1c5de619daa88c850906df"></a>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR&#160;</td><td class="fielddoc"><p>The caller violated an assertion or an unexpected error occurred </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga017ae86f3351888f50feb47026ed2482"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga017ae86f3351888f50feb47026ed2482">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a>* FLAC__metadata_simple_iterator_new </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a new iterator instance.</p>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__Metadata_SimpleIterator*</td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4619be06f51429fea71e5b98900cec3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4619be06f51429fea71e5b98900cec3e">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_delete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FLAC__metadata_simple_iterator_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Free an iterator instance. Deletes the object pointed to by <em>iterator</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="gae8fd236fe6049c61f7f3b4a6ecbcd240"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8fd236fe6049c61f7f3b4a6ecbcd240">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_status()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__flac__metadata__level1.html#gac926e7d2773a05066115cac9048bbec9">FLAC__Metadata_SimpleIteratorStatus</a> FLAC__metadata_simple_iterator_status </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the current status of the iterator. Call this after a function returns <code>false</code> to get the reason for the error. Also resets the status to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__Metadata_SimpleIteratorStatus</td><td>The current status of the iterator. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaba8daf276fd7da863a2522ac050125fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaba8daf276fd7da863a2522ac050125fd">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__bool&#160;</td>
          <td class="paramname"><em>read_only</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__bool&#160;</td>
          <td class="paramname"><em>preserve_file_stats</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the iterator to point to the first metadata block in the given FLAC file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing iterator. </td></tr>
    <tr><td class="paramname">filename</td><td>The path to the FLAC file. </td></tr>
    <tr><td class="paramname">read_only</td><td>If <code>true</code>, the FLAC file will be opened in read-only mode; if <code>false</code>, the FLAC file will be opened for edit even if no edits are performed. </td></tr>
    <tr><td class="paramname">preserve_file_stats</td><td>If <code>true</code>, the owner and modification time will be preserved even if the FLAC file is written to. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line">filename != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>false</code> if a memory allocation error occurs, the file can't be opened, or another error occurs, else <code>true</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga5150ecd8668c610f79192a2838667790"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5150ecd8668c610f79192a2838667790">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_is_writable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_is_writable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns <code>true</code> if the FLAC file is writable. If <code>false</code>, calls to <a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a> and <a class="el" href="group__flac__metadata__level1.html#ga7a0c00e93bb37324a20926e92e604102">FLAC__metadata_simple_iterator_insert_block_after()</a> will fail.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabb7de0a1067efae353e0792dc6e51905"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabb7de0a1067efae353e0792dc6e51905">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_next()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Moves the iterator forward one metadata block, returning <code>false</code> if already at the end.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>false</code> if already at the last metadata block of the chain, else <code>true</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6db5313b31120b28e210ae721d6525a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6db5313b31120b28e210ae721d6525a8">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_prev()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_prev </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Moves the iterator backward one metadata block, returning <code>false</code> if already at the beginning.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>false</code> if already at the first metadata block of the chain, else <code>true</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9eb215059840960de69aa84469ba954f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9eb215059840960de69aa84469ba954f">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_is_last()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_is_last </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a flag telling if the current metadata block is the last.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if the current metadata block is the last in the file, else <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gade0a61723420daeb4bc226713671c6f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gade0a61723420daeb4bc226713671c6f0">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_get_block_offset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off_t FLAC__metadata_simple_iterator_get_block_offset </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the offset of the metadata block at the current position. This avoids reading the actual block data which can save time for large blocks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">off_t</td><td>The offset of the metadata block at the current iterator position. This is the byte offset relative to the beginning of the file of the current metadata block's header. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga17b61d17e83432913abf4334d6e0c073"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga17b61d17e83432913abf4334d6e0c073">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_get_block_type()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__flac__format.html#gac71714ba8ddbbd66d26bb78a427fac01">FLAC__MetadataType</a> FLAC__metadata_simple_iterator_get_block_type </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the type of the metadata block at the current position. This avoids reading the actual block data which can save time for large blocks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__MetadataType</td><td>The type of the metadata block at the current iterator position. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf29b9a7f2e2c762756c1444e55a119fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf29b9a7f2e2c762756c1444e55a119fa">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_get_block_length()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t FLAC__metadata_simple_iterator_get_block_length </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the length of the metadata block at the current position. This avoids reading the actual block data which can save time for large blocks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">uint32_t</td><td>The length of the metadata block at the current iterator position. The is same length as that in the <a href="http://xiph.org/flac/format.html#metadata_block_header">metadata block header</a>, i.e. the length of the metadata body that follows the header. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad4fea2d7d98d16e75e6d8260f690a5dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad4fea2d7d98d16e75e6d8260f690a5dc">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_get_application_id()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_get_application_id </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__byte *&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the application ID of the <code>APPLICATION</code> block at the current position. This avoids reading the actual block data which can save time for large blocks.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td class="paramname">id</td><td>A pointer to a buffer of at least <code>4</code> bytes where the ID will be stored. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line"><span class="keywordtype">id</span> != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if the ID was successfully read, else <code>false</code>, in which case you should check <a class="el" href="group__flac__metadata__level1.html#gae8fd236fe6049c61f7f3b4a6ecbcd240">FLAC__metadata_simple_iterator_status()</a> to find out why. If the status is <code>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT</code>, then the current metadata block is not an <code>APPLICATION</code> block. Otherwise if the status is <code>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR</code> or <code>FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR</code>, an I/O error occurred and the iterator can no longer be used. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1b7374cafd886ceb880b050dfa1e387a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1b7374cafd886ceb880b050dfa1e387a">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_get_block()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a>* FLAC__metadata_simple_iterator_get_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the metadata block at the current position. You can modify the block but must use <a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a> to write it back to the FLAC file.</p>
<p>You must call <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a> on the returned object when you are finished with it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__StreamMetadata*</td><td>The current metadata block, or <code>NULL</code> if there was a memory allocation error. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae1dd863561606658f88c492682de7b80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae1dd863561606658f88c492682de7b80">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_set_block()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_set_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__bool&#160;</td>
          <td class="paramname"><em>use_padding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write a block back to the FLAC file. This function tries to be as efficient as possible; how the block is actually written is shown by the following:</p>
<p>Existing block is a STREAMINFO block and the new block is a STREAMINFO block: the new block is written in place. Make sure you know what you're doing when changing the values of a STREAMINFO block.</p>
<p>Existing block is a STREAMINFO block and the new block is a not a STREAMINFO block: this is an error since the first block must be a STREAMINFO block. Returns <code>false</code> without altering the file.</p>
<p>Existing block is not a STREAMINFO block and the new block is a STREAMINFO block: this is an error since there may be only one STREAMINFO block. Returns <code>false</code> without altering the file.</p>
<p>Existing block and new block are the same length: the existing block will be replaced by the new block, written in place.</p>
<p>Existing block is longer than new block: if use_padding is <code>true</code>, the existing block will be overwritten in place with the new block followed by a PADDING block, if possible, to make the total size the same as the existing block. Remember that a padding block requires at least four bytes so if the difference in size between the new block and existing block is less than that, the entire file will have to be rewritten, using the new block's exact size. If use_padding is <code>false</code>, the entire file will be rewritten, replacing the existing block by the new block.</p>
<p>Existing block is shorter than new block: if use_padding is <code>true</code>, the function will try and expand the new block into the following PADDING block, if it exists and doing so won't shrink the PADDING block to less than 4 bytes. If there is no following PADDING block, or it will shrink to less than 4 bytes, or use_padding is <code>false</code>, the entire file is rewritten, replacing the existing block with the new block. Note that in this case any following PADDING block is preserved as is.</p>
<p>After writing the block, the iterator will remain in the same place, i.e. pointing to the new block.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td class="paramname">block</td><td>The block to set. </td></tr>
    <tr><td class="paramname">use_padding</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> <div class="fragment"><div class="line">block != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7a0c00e93bb37324a20926e92e604102"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7a0c00e93bb37324a20926e92e604102">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_insert_block_after()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_insert_block_after </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__bool&#160;</td>
          <td class="paramname"><em>use_padding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is similar to <a class="el" href="group__flac__metadata__level1.html#gae1dd863561606658f88c492682de7b80">FLAC__metadata_simple_iterator_set_block()</a> except that instead of writing over an existing block, it appends a block after the existing block. <em>use_padding</em> is again used to tell the function to try an expand into following padding in an attempt to avoid rewriting the entire file.</p>
<p>This function will fail and return <code>false</code> if given a STREAMINFO block.</p>
<p>After writing the block, the iterator will be pointing to the new block.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td class="paramname">block</td><td>The block to set. </td></tr>
    <tr><td class="paramname">use_padding</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> <div class="fragment"><div class="line">block != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac3116c8e6e7f59914ae22c0c4c6b0a23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3116c8e6e7f59914ae22c0c4c6b0a23">&#9670;&nbsp;</a></span>FLAC__metadata_simple_iterator_delete_block()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_simple_iterator_delete_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__flac__metadata__level1.html#ga6accccddbb867dfc2eece9ee3ffecb3a">FLAC__Metadata_SimpleIterator</a> *&#160;</td>
          <td class="paramname"><em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FLAC__bool&#160;</td>
          <td class="paramname"><em>use_padding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Deletes the block at the current position. This will cause the entire FLAC file to be rewritten, unless <em>use_padding</em> is <code>true</code>, in which case the block will be replaced by an equal-sized PADDING block. The iterator will be left pointing to the block before the one just deleted.</p>
<p>You may not delete the STREAMINFO block.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">iterator</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td class="paramname">use_padding</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:\n</dt><dd><div class="fragment"><div class="line">iterator != NULL </div>
</div><!-- fragment --> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#gaba8daf276fd7da863a2522ac050125fd">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="gaa2a8b972800c34f9f5807cadf6ecdb57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa2a8b972800c34f9f5807cadf6ecdb57">&#9670;&nbsp;</a></span>FLAC__Metadata_SimpleIteratorStatusString</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* const FLAC__Metadata_SimpleIteratorStatusString[]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Maps a FLAC__Metadata_SimpleIteratorStatus to a C string.</p>
<p>Using a FLAC__Metadata_SimpleIteratorStatus as the index to this array will give the string equivalent. The contents should not be modified. </p>

</div>
</div>
</div><!-- contents -->

<hr size="1"/>
<div class="copyright">
	<!-- @@@ oh so hacky -->
	<table>
		<tr>
			<td align="left">
				Copyright (c) 2000-2009  Josh Coalson
				Copyright (c) 2011-2016  Xiph.Org Foundation
			</td>
			<td width="1%" align="right">
				<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
			</td>
		</tr>
	</table>
</div>
<!-- Copyright (c) 2000-2009  Josh Coalson -->
<!-- Copyright (c) 2011-2016  Xiph.Org Foundation -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>
